package com.woniu.communitymanagement.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniu.communitymanagement.entity.HttpResult;
import com.woniu.communitymanagement.entity.PropertyInfo;
import com.woniu.communitymanagement.entity.PropertyType;
import com.woniu.communitymanagement.mapper.PropertyTypeMapper;
import com.woniu.communitymanagement.service.PropertyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PropertyTypeServiceImpl implements PropertyTypeService {

    @Autowired(required = false)
    private PropertyTypeMapper propertyTypeMapper;

    @Override
    public HttpResult selectAll(){
        List<PropertyType> propertyTypes = propertyTypeMapper.selectAll();
        HttpResult result = null;
        if (propertyTypes != null){
            result = new HttpResult(propertyTypes,0,200,null);
        }else{
            result = new HttpResult(null,0,500,"没有更多数据");
        }
        return result;
    }


}
